Repository navigation
fix(steward): recover stopped report turns with valid saved editorial responses - #9164
Conversation
…d report candidates Signed-off-by: LoopX Agent <[email protected]>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | model=Gemini (Antigravity) | provider=Google DeepMind | declaration_source=self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
使用 LoopX 定期报告(StewardReports 与 ManagedSessionReports)的用户及自动化守护进程:当模型在最终回复中已经产出了完整有效的周期报告正文与结构化结果,仅因未加引号的 JSON 末尾多余逗号或结尾纯分隔符串中多出 1–2 个冗余括号而解析失败时触发本问题。
改造前:strict json.loads 拒绝此类轻微分隔符瑕疵,导致 parse_model_json 返回 None,宿主回退为 wait / no_typed_host_result 并将 Turn 日志标为 stopped(未写报告、未扣额度),后续 30s 轮询因只认 private-generation.json 而长期滞留;改造后:_repair_minor_json_delimiters 仅在严格 JSON 解析失败后于字符串外容忍尾逗号和末尾最多 2 个冗余闭合符,且对历史已停止并保留有效 answer.final 候选的 Turn,经共享 TS 准入后无模型冻结并完成 .saved-candidate 结算与送达。
轻微 JSON 分隔符瑕疵不再阻断有效报告或任务 Turn 落地,且已停止但 answer.final 已保存匹配当前请求摘要的周期报告 Turn 可在不重复调用模型的前提下完成冻结、任务结项与原会话送达;截断 JSON、未闭合字符串、对象中间分隔符错位或缺少有效候选的结果继续严格 fail-closed 拦截。
边界与非目标(Non-goals):不自动重跑缺失或截断的模型生成、不放宽字符串字面量内部解析、不引入新的协议枚举或替代现有 Turn 事务恢复状态机。
剩余缺口(Remaining gap):真实运行环境热升级后既有滞留窗口的线上冻结与投递闭环,需在本次 PR 合入部署后通过线上观察确认。
改动思路 / Approach
flowchart LR
A["answer.final JSON"] -->|"strict json.loads"| B{"Valid JSON?"}
B -->|"yes"| C["freeze + commit"]
B -->|"no: _repair_minor_json_delimiters"| D{"Trailing comma / <=2 extra end closers?"}
D -->|"yes"| C
D -->|"no: fail closed"| E["stopped wait (no_typed_host_result)"]
E -->|"frontier check on saved answer.final"| F{"digest match + zero effects + TS admit?"}
F -->|"yes"| G["freeze once + .saved-candidate settle (0 model calls)"]
F -->|"no"| H["keep stopped, no replay"]
来源推导示意图(Illustrative, head 48347211be):展示新增 JSON 分隔符容错与历史 stopped 报告候选无模型恢复分支;非运行时执行轨迹证明。
复用已有 host_candidate.parse_model_json 边界、steward_managed_mode.reportSettlementOnly TS 所有者以及 steward_reports / steward_turn 的报告结算恢复链路,将轻微分隔符容错、历史已停止候选校验与单次 .saved-candidate 结算绑定在同一受保护契约内,未新增并行状态存储或模型重入路径。
当前 PR 边界:仅覆盖 parse_model_json 的字符串外尾逗号/末尾 <=2 冗余闭合符容错,以及报告窗口尚无 private-generation.json 且 journal 为 stopped/no_typed_host_result 但 answer.final 已含匹配 request_digest 的候选恢复;不改动非报告类 Turn 恢复或模型重试策略。
具体改动 / Changes
loopx/control_plane/turn_driver/host_candidate.py:_repair_minor_json_delimiters,parse_model_json。loopx/control_plane/collaboration/steward_managed_mode.ts:reportSettlementOnly(acceptedStoppedCandidate,completedGeneration)。loopx/capabilities/native_chat/steward_turn.py,loopx/capabilities/native_chat/steward_reports.py:_stopped_report_candidate_recovery,has_recoverable_stopped_report,_build_replay_runner,_settle_stopped_report_candidate,recover_report_settlement,StewardReports._frontier,ManagedSessionReports.frontier。tests/control_plane_ts/steward_reports.test.ts,tests/test_dsh_goal_mode.py,tests/test_native_steward_reports.py: 覆盖正常/截断/字符串保护及 file/sqlite 端到端无模型恢复回归。
对主干的风险 / Risks
- JSON 容错误接受半截断输出的风险(已约束):
_repair_minor_json_delimiters严格跳过双引号字符串内部转义内容,仅处理字符串外,}/]尾逗号与完全处于结尾纯闭合符串中且不改变开闭顺序、多余数量<= 2的闭合符;截断 JSON、未闭合引号、缺少闭合符、对象中间闭合错误或多于 2 个多余括号全部返回None保持 fail-closed。 - 历史 stopped Turn 恢复误触或重入模型(已约束):
has_recoverable_stopped_report与_stopped_report_candidate_recovery要求status == "stopped"、host_attempt_count == 1、classification == "no_typed_host_result"、已存在对应native_loopx.result停止事件、且answer.final解析出的editorial_response.request_digest精确匹配当前冻结editorial-request.json;任何冻结或结算写操作前都先通过共享 TS 策略层admitStewardManagedTurn/admitManagedSessionTurn,并严格使用只允许执行一次的单例内存回调_build_replay_runner,绝不再次调用模型。若editorial-response.json已写出但缺少private-generation.json(即生成内容本身校验失败),下一轮直接返回None保留反例并停止重试。 - 测试范围限制(Residual risk):真实运行环境热升级后既有滞留窗口的线上冻结与投递闭环,需在本次 PR 合入部署后通过线上观察确认。
我的整体评价 / Verdict
本地校验全量通过:node --experimental-strip-types --test tests/control_plane_ts/steward_reports.test.ts (11/11 PASSED)、ruff check(5 文件 clean)、tests/test_dsh_goal_mode.py + tests/test_lark_steward_reports.py (423 PASSED)、tests/test_native_steward_managed_mode.py (11 PASSED)、tests/test_native_steward_reports.py (165 PASSED,含 file/sqlite 双存储引擎 stopped 报告无模型恢复与无效候选拒绝用例)、loopx check (errors=0, warnings=0) 及 loopx canary premerge --tier quick (ok=true, failures=0)。未检查范围(UI/视觉):本次改动仅涉及 Python JSON 解析兜底、TS 报告结算恢复准入及原生报告恢复逻辑,不涉及前端页面、视觉样式或渲染布局变更。(unverified_scope: none)。未发现阻断问题。
英文简短结论:
English verdict: APPROVE at head 4834721; no blocking findings remain, bounded JSON delimiter repair fails closed on truncation and TS-admitted stopped report candidate settlement completes via a zero-model .saved-candidate transaction, with 11 TS tests, 599 Python tests across touched suites, ruff, loopx check, and quick canary premerge passing.
* fix(cli): preserve typed runtime diagnostics in Turn failures Signed-off-by: LoopX Agent <[email protected]> * feat(steward): support per-endpoint model preferences and Codex-to-Antigravity failover (#9141) Signed-off-by: LoopX Agent <[email protected]> * Keep the prepared Chat adapter available to a retry (#9134) A failed worker start can finish cleanup after a same-turn retry has selected the adapter. Keep its lifetime tied to the Session and let failed dispatch release its own worker registration. The regression asserts one upstream turn and explicit adapter closure with the Session. Port the fix from 4453e4bdd77486ec14b952f88ca893310b32e26c. (cherry picked from commit 173e42b4f051b885c3a3389e1cad9c5722f7b7dd) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover zero-effect monitors and cleared-replan reports (#9143) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): admit flexible_primary_available executor transitions in conversation_scope (#9145) Signed-off-by: LoopX Agent <[email protected]> * Verify quota gate scope through signed lane references (#9101) * test(quota): verify scoped gates through complete lane references Signed-off-by: LoopX Agent <[email protected]> * Test canonical quota gates in both public response modes Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Test C1 planning and Host input from the original quota capture (#9102) * Use recorded quota decisions in the no-Todo settlement regression Signed-off-by: LoopX Agent <[email protected]> * Exercise the complete Host prompt from the captured quota source Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Prepare the CLI budget baseline with a private Git index (#9103) Signed-off-by: LoopX Agent <[email protected]> * Exercise C1 Goal delivery and bound replan from the saved source (#9104) Signed-off-by: LoopX Agent <[email protected]> * Keep long claim overlap scopes on demand (#9086) * Link long thin-claim overlap lists to their receipts Signed-off-by: LoopX Agent <[email protected]> * Read claim overlap details without copying the lease Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(quota): preserve explicit Monitor Todo selection (#9099) Carry Todo selection provenance into quota admission. Preserve explicit secondary Monitor polling and recovery from previously admitted receipts. Signed-off-by: LoopX Agent <[email protected]> * Keep ready Todo scope details on the required context read (#9106) Signed-off-by: LoopX Agent <[email protected]> * Fix archive rollback with custom install directories (#9066) * refactor(core): defer benchmark implementations during capability discovery Preserve the benchmark toolkit public exports and static types while keeping execution and experiment implementations out of metadata discovery. Qualify source and installed Core paths, and reconcile the paired minimal/Standard RFC boundary without changing activation or authority defaults. Signed-off-by: cicolord <[email protected]> * Defer Yardstick evaluation until an enabled Explore read Signed-off-by: cicolord <[email protected]> * Omit empty Todo summary lanes from ordinary Worker context Signed-off-by: cicolord <[email protected]> * fix(update): honor configured archive directories during rollback Signed-off-by: LoopX Agent <[email protected]> * fix(lark): replay recall guard on current main Signed-off-by: huangruiteng <[email protected]> * docs: record the verified LoopX 2.3.0 release baseline Signed-off-by: LoopX Agent <[email protected]> * Preserve quota spend source when prepared work is admitted Signed-off-by: LoopX Agent <[email protected]> * test(quota): qualify native saved complete-Turn checkpoints Signed-off-by: LoopX Agent <[email protected]> * Retry cleanup of an owned file mutation marker Signed-off-by: LoopX Agent <[email protected]> * Keep synthetic Git-path test data outside the public source scan Signed-off-by: LoopX Agent <[email protected]> * fix(quota): share native preparation wait with readiness Signed-off-by: LoopX Agent <[email protected]> * fix(doctor): bind package update readback to its Python environment Signed-off-by: LoopX Agent <[email protected]> * Keep Doctor discovery separate from service activation Signed-off-by: LoopX Agent <[email protected]> * Verify the recorded Python launcher before Doctor probes it Signed-off-by: LoopX Agent <[email protected]> * fix(desktop): require runtime qualification for macOS preview updates Signed-off-by: LoopX Agent <[email protected]> * fix(quota): reuse replan projection owners during recovery Signed-off-by: LoopX Agent <[email protected]> * Qualify Codex 0.169 native context replay on main Signed-off-by: LoopX Agent <[email protected]> * Stop regenerating retired quota view aliases Signed-off-by: LoopX Agent <[email protected]> * fix: pin deferred native context reads to the original capture Signed-off-by: LoopX Agent <[email protected]> * Keep native capture navigation within small output budgets Signed-off-by: LoopX Agent <[email protected]> * Retire legacy heartbeat work prompt generation Signed-off-by: LoopX Agent <[email protected]> * Capture C1 composition failures as receipt diagnostics Signed-off-by: LoopX Agent <[email protected]> * Recover interrupted native Todo readiness from the original Turn Signed-off-by: LoopX Agent <[email protected]> * Revalidate the original lease before publishing resumed native context Signed-off-by: LoopX Agent <[email protected]> * Fence native readiness publication with the canonical lease writer Signed-off-by: LoopX Agent <[email protected]> * fix(scheduler): keep Codex fallback on the original C1 runtime Signed-off-by: LoopX Agent <[email protected]> * fix(scheduler): pin the originating fallback launchers Signed-off-by: LoopX Agent <[email protected]> * Retire the duplicate Codex App scheduler projection Signed-off-by: LoopX Agent <[email protected]> * Seed the recorded scheduler profile in the elapsed-backoff fixture Signed-off-by: LoopX Agent <[email protected]> * Verify canonical cadence on refused and settled Turns Signed-off-by: LoopX Agent <[email protected]> * Pin named Core commands in saved scheduler fallbacks Signed-off-by: LoopX Agent <[email protected]> * fix(research): preserve saved case addresses when a version cannot open Signed-off-by: LoopX Agent <[email protected]> * Preserve citation focus after a saved study refresh Signed-off-by: LoopX Agent <[email protected]> * Capture authenticated LoopX receipts for Research attention (#8790) * feat(research): capture authenticated LoopX attention receipts Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * fix(research): tighten attention receipt provenance Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * fix(research): publish attention captures after source validation Signed-off-by: huangruiteng <[email protected]> --------- Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: huangruiteng <[email protected]> Co-authored-by: TRAE CLI <[email protected]> Co-authored-by: huangruiteng <[email protected]> * Recover the original Session and Turn from a confirmed Chat task Signed-off-by: huangruiteng <[email protected]> * perf(lark,native_chat): eliminate redundant full-directory JSON reparsing in steward chat loops (#9041) * perf(lark,native_chat): avoid full directory reparsing in steward chat loops - Make LarkOwnerAttention._route iterate capture candidates lazily so matching stops at the newest valid p2p capture. - Reuse FileChatDiscovery in PrivateIngressObserver._records while preserving strict field validation and fail-closed errors. - Reuse FileChatDiscovery in ChatExternalConversations.pending so unchanged request journals skip redundant JSON reads and stay mutation-isolated. - Add regression and scan-efficiency tests in tests/test_lark_steward_directory_scan_perf.py. Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): project small recovery metadata fields to stop data_url memory growth Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Retire transitional smoke checks and duplicate execution (#9073) Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * feat(steward): support probe-gated generic continuous_monitor todos with handoff and user actions (#9074) Signed-off-by: LoopX Agent <[email protected]> * Remove redundant defensive prose from prompts and comments (#9072) Remove redundant defensive prose while preserving published heartbeat wrappers and externally managed skill readiness. Validated with 197 related tests, independent historical wrapper migrations and negative cases, installed-skill readback, and current-main quick canary. Existing CI qualification and infrastructure limitations remain recorded in PR #9072. Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> * Keep original Chat retry errors visible during receipt refresh Signed-off-by: LoopX Agent <[email protected]> * fix(steward): tolerate report validator python drift and allow cancel of mid-turn failed reports (#9077) Signed-off-by: LoopX Agent <[email protected]> * feat(steward): add exact-head PR review signals and protected merge confirmation (#9081) Signed-off-by: LoopX Agent <[email protected]> * feat(steward): add isolated OpenViking long-term memory with per-speaker boundaries (#9083) Signed-off-by: LoopX Agent <[email protected]> * refactor(content-ops): slim surface module and eliminate Any (#8961) * refactor(content-ops): slim surface module and eliminate Any Signed-off-by: LoopX Agent <[email protected]> * fix(content-ops): reject malformed angle source_item_ids containers Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(collaboration): batch handoff query Goal lifetime guard lock per Goal (#9085) Signed-off-by: LoopX Agent <[email protected]> * fix(hosts): raise managed service startup readiness timeout to 45s (#9087) Signed-off-by: LoopX Agent <[email protected]> * perf(manager-context): memoize history_inspect lifecycle checks and scope runtime revision in handoffs query (#9088) Eliminate the remaining O(N) Effect runtime RPCs and uncached runtime fingerprinting inside tracking.query(): enter effect_runtime_request_scope() for the query, memoize pure history_inspect lifecycle decisions across entries sharing identical Goal refs while holding the Goal lifetime guard, lazily discover legacy ingress files only when external audience recovery needs them, and preserve entry scan order across Goal batches. Signed-off-by: LoopX Agent <[email protected]> * refactor(lark): slim private_conversations below 2000 lines with net LOC reduction (#8929) Signed-off-by: LoopX Agent <[email protected]> * perf(chat,hosts): skip frontend source re-hashing on immutable installed releases and extend readiness timeout to 90s (#9089) Signed-off-by: LoopX Agent <[email protected]> * refactor(control-plane): split and slim quota monitor_poll_commit (#8885) * refactor(control-plane): split and slim quota monitor_poll_commit Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): preserve legacy lane budget and observation diagnostic order Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * refactor(quota): slim loopx/quota.py and tighten Any count to zero (#8939) Signed-off-by: LoopX Agent <[email protected]> * refactor(native-chat): slim external_conversations below 2k lines and retire ceiling (#8911) * refactor(native-chat): move steward commission mixin to steward_commands and retire external_conversations ceiling Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): respect include_raw_response in retained result recovery Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * refactor(chat): slim chat_runtime below 1,500 lines, fix entry-point project_contexts guard, and retire ceiling (#8920) * refactor(chat): move session lifecycle mixin to session_open, deduplicate runtime helpers, and retire ceiling Signed-off-by: LoopX Agent <[email protected]> * fix(chat): drop turn_done_events slot before waking waiters on Thread.start failure Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): paginate open PR signal GraphQL, allow signal-unavailable monitor recovery, and cache private delivery scans (#9093) Signed-off-by: LoopX Agent <[email protected]> * perf(lark,native_chat): back off noop recovery retries and cache recovery lookups (#9096) Signed-off-by: LoopX Agent <[email protected]> * perf(native_chat,lark): cache unchanged quota backlog health and interrupt observations (#9098) Signed-off-by: LoopX Agent <[email protected]> * perf(lark,native_chat): coalesce listener snapshots and cache recovery event summaries (#9100) Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: cicolord <[email protected]> Signed-off-by: LoopX Agent <[email protected]> Signed-off-by: huangruiteng <[email protected]> Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> Co-authored-by: cicolord <[email protected]> Co-authored-by: huangruiteng <[email protected]> Co-authored-by: Lusen Dong <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * refactor(issue-fix): consolidate maintainer-correction admission and slim pr_lifecycle (#8897) Signed-off-by: LoopX Agent <[email protected]> * Fix truncated requests and responses in the Codex API relay (#8713) * fix(codex relay): fence incomplete model requests before drain Signed-off-by: LoopX Agent <[email protected]> * fix(codex relay): surface incomplete upstream responses Port the verified response framing fix to the request-admission branch. Original candidate 27bc3aee311cdfc6a00466ff9d3b58c7db36e01b. Signed-off-by: LoopX Agent <[email protected]> * Bound Codex relay writes to clients that stop reading Signed-off-by: LoopX Agent <[email protected]> * Reject upstream chunked responses missing the trailer terminator Signed-off-by: LoopX Agent <[email protected]> * Validate upstream chunk data delimiters before relay completion Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(release): repair dsh closeout test, antigravity failover alias, and release download retry (#9147) Signed-off-by: LoopX Agent <[email protected]> * docs(release): update v2.4.0 release notes and dsh-loopx-plugin 0.1.1-beta.7 README (#9149) Signed-off-by: LoopX Agent <[email protected]> * fix(chat): recover saved answers and diagnose lost workers (#9120) * fix(chat): recover saved answers and diagnose lost workers Signed-off-by: LoopX Agent <[email protected]> * style(lark): keep private_conversations within module line budget Signed-off-by: LoopX Agent <[email protected]> * fix(chat): retain execution_worker_exited in pending backlog count Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(chat): resume steward requests lost before dispatch (#9125) Signed-off-by: LoopX Agent <[email protected]> * fix(benchmark): restore frozen v1 archives and align checkpoint/runtime tests with C1 defaults (#9151) Signed-off-by: LoopX Agent <[email protected]> * fix(release): stabilize CLI help, architecture guards, onboarding gate, and public smokes (#9152) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover report selection across python upgrades and prevent queue kill on observation monitors (#9155) Signed-off-by: LoopX Agent <[email protected]> * fix(release): align extensions, chat, presentation, and transport tests for v2.4.0 (#9156) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 quota, turn-envelope, and capabilities slice (Slice B1) (#9154) * fix(control-plane): stabilize v2.4.0 quota, turn-envelope, and capabilities slice Signed-off-by: LoopX Agent <[email protected]> * fix(quota): preserve tokenless identity and exact numeric types in attach_complete_turn_context Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover frozen report contract failures and rebind resumed task leases (#9157) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover pre-dispatch runtime failures across endpoints and stop receipt-unknown disk churn (#9159) Signed-off-by: LoopX Agent <[email protected]> * fix(control_plane): align lease recovery, settlement readback, and runtime fixtures (#9158) * fix(control_plane): align lease recovery, settlement readback, and runtime fixtures Signed-off-by: LoopX Agent <[email protected]> * fix(control_plane): forward record_capture in worker outage test and harden version type guard Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 explore, context, and checkpoint tail slice (Slice B4) (#9161) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 replan, monitor recovery, and staged-read slice (Slice B5) (#9160) Signed-off-by: LoopX Agent <[email protected]> * docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording (#9162) * docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording Signed-off-by: LoopX Agent <[email protected]> * docs(release): align #9158 and #9161 descriptions with verified commits Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): tolerate minor JSON delimiter glitches and recover saved report candidates (#9164) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): preserve bound yardstick reversals in native replan openings (#9165) Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): recover loopback relay 401 failures and isolate test auth (#9167) Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> Signed-off-by: cicolord <[email protected]> Signed-off-by: huangruiteng <[email protected]> Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> Co-authored-by: cicolord <[email protected]> Co-authored-by: huangruiteng <[email protected]> Co-authored-by: Lusen Dong <[email protected]> Co-authored-by: TRAE CLI <[email protected]>
Summary
loopx/control_plane/turn_driver/host_candidate.py): Add_repair_minor_json_delimitersbehind strictjson.loadsfailure inparse_model_jsonto strip unquoted trailing commas before}/]and trim at most 2 redundant closing brackets strictly inside a terminal closing-delimiter run, while preserving all characters inside string literals and failing closed on truncated JSON, unterminated strings, or mid-object delimiter mismatches.loopx/control_plane/collaboration/steward_managed_mode.ts): ExtendreportSettlementOnly(admitStewardManagedTurnandadmitManagedSessionTurn) to admit an explicit proof for a stopped report Turn whose journal recordedhost_attempt_count: 1, zero write/quota/scheduler effects (classification: "no_typed_host_result"), and an already-preserved valideditorial_response, plus idempotent.saved-candidatecompletion key readback.loopx/capabilities/native_chat/steward_turn.py,steward_reports.py): When a due report Turn stopped withno_typed_host_result(private-generation.jsonnot yet written), check whetheranswer.finalcontains a valid candidate matching the frozeneditorial-request.jsondigest (has_recoverable_stopped_report/_stopped_report_candidate_recovery), admit via the shared TS owner before mutating state, freeze the report artifacts once (reports.freeze+validate_private_generation), and settle via one bounded.saved-candidateTurn transaction with zero model invocations before letting normal publication proceed.Local Verification
node --experimental-strip-types --test tests/control_plane_ts/steward_reports.test.ts: 11/11 passed.uv run --extra test ruff checkon all 5 modified Python files: passed.uv run --extra test python -m pytest tests/test_dsh_goal_mode.py tests/test_lark_steward_reports.py -q: 423 passed.uv run --extra test python -m pytest tests/test_native_steward_managed_mode.py -q: 11 passed.uv run --extra test python -m pytest tests/test_native_steward_reports.py -q: 165 passed (includingtest_stopped_no_typed_result_report_recovers_saved_editorial_candidate_without_model_replay[file|sqlite]andtest_stopped_report_without_valid_saved_editorial_candidate_stays_closed).uv run --extra test loopx check --scan-path ...:errors=0, warnings=0, public boundary scan clean.uv run --extra test loopx canary premerge --from-git-diff --git-diff-base origin/main --tier quick:ok=true, failures=0.